﻿using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;
using System.Text;

namespace Ruleweaver.Conditions
{
	[ContractClass(typeof(IConditionSourceContract))]
	public interface IConditionSource
	{
		IEnumerable<Condition> GetConditions();
	}

	[ContractClassFor(typeof(IConditionSource))]
	internal abstract class IConditionSourceContract : IConditionSource
	{
		IEnumerable<Condition> IConditionSource.GetConditions()
		{
			Contract.Ensures(Contract.Result<IEnumerable<Condition>>() != null);

			return null;
		}
	}
}